package com.ruoyi.recruit.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.recruit.mapper.ERecruitMapper;
import com.ruoyi.common.core.domain.e_recruit.ERecruit;
import com.ruoyi.recruit.service.IERecruitService;

/**
 * 招聘Service业务层处理
 * 
 * @author JYW
 * @date 2024-01-30
 */
@Service
public class ERecruitServiceImpl implements IERecruitService 
{
    @Autowired
    private ERecruitMapper eRecruitMapper;

    /**
     * 查询招聘
     * 
     * @param id 招聘主键
     * @return 招聘
     */
    @Override
    public ERecruit selectERecruitById(Long id)
    {
        return eRecruitMapper.selectERecruitById(id);
    }

    /**
     * 查询招聘列表
     * 
     * @param eRecruit 招聘
     * @return 招聘
     */
    @Override
    public List<ERecruit> selectERecruitList(ERecruit eRecruit)
    {
        return eRecruitMapper.selectERecruitList(eRecruit);
    }

    /**
     * 新增招聘
     * 
     * @param eRecruit 招聘
     * @return 结果
     */
    @Override
    public int insertERecruit(ERecruit eRecruit)
    {
        eRecruit.setCreateTime(DateUtils.getNowDate());
        return eRecruitMapper.insertERecruit(eRecruit);
    }

    /**
     * 修改招聘
     * 
     * @param eRecruit 招聘
     * @return 结果
     */
    @Override
    public int updateERecruit(ERecruit eRecruit)
    {
        eRecruit.setUpdateTime(DateUtils.getNowDate());
        return eRecruitMapper.updateERecruit(eRecruit);
    }

    /**
     * 批量删除招聘
     * 
     * @param ids 需要删除的招聘主键
     * @return 结果
     */
    @Override
    public int deleteERecruitByIds(Long[] ids)
    {
        return eRecruitMapper.deleteERecruitByIds(ids);
    }

    /**
     * 删除招聘信息
     * 
     * @param id 招聘主键
     * @return 结果
     */
    @Override
    public int deleteERecruitById(Long id)
    {
        return eRecruitMapper.deleteERecruitById(id);
    }
}
